package com.brozha.ans_sys.entity.vo;

import com.brozha.ans_sys.entity.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author brozha
 * @since 2021/4/4
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserVO {

    String userName;
    Long score;
    //权限等级，0为管理员，1为普通用户
    Integer level;
    String avatar;
    String nickname;

    public UserVO(User userPojo){
        this.userName = userPojo.getUserName();
        this.score = userPojo.getScore();
        this.level = userPojo.getLevel();
        this.avatar = userPojo.getAvatar();
        this.nickname = userPojo.getNickname();
    }
}
